package com.zyh.scs.admin.api.dto.open;

import com.zyh.scs.admin.api.vo.open.GoodsDetailVO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author hwh
 * @ClassName: 订单扣费接口DTO$
 * @Description: $
 * @Date $
 * @Version 1.0
 */
@Data
public class UserDeductionDTO implements Serializable {

    @Schema(description = "商户订单号")
    @NotBlank(message = "商户订单号不能为空")
    private String outTradeNo;

    @Schema(description = "交易流水号")
    @NotBlank(message = "交易流水号不能为空")
    private String transactionSerial;

    @Schema(description = "用户id")
    private String guid;

    @Schema(description = "物理卡号")
    private String cardId;

    /**
     * 其中 guid、物理卡号、手机号必传其一，优先校验guid，其次是物理卡号，最后是用户手机号
     */
    @Schema(description = "用户手机号")
    private String userPhone;

    @Schema(description = "消费金额")
    @NotNull(message = "消费金额不能为空")
    private BigDecimal amount;

    @Schema(description = "福利卡账户抵扣金额")
    private BigDecimal balance;

    @Schema(description = "现金账户抵扣金额")
    private BigDecimal cashBalance;

    @Schema(description = "订单时间戳")
    @NotBlank(message = "订单时间戳不能为空")
    private String timestamp;

    @Schema(description = "门店编码")
    private String storeId;

    @Schema(description = "门店名称")
    private String storeName;

    @Schema(description = "门店点位名称")
    private String shopName;

    @Schema(description = "消费备注")
    private String note;

    /**
     * 商品清单
     */
    @Schema(description = "商品清单")
    private List<GoodsDetailVO> goodsDetail;

    /**
     * 消费类型（1-食堂就餐 2-食堂超市 3-食堂咖啡机）
     */
    @Schema(description = "消费类型（1-食堂就餐 2-食堂超市 3-食堂咖啡机）")
    private String consumeType;

    /**
     * 二维码支付标识
     */
    @Schema(description = "二维码支付标识")
    private String operQrCode;
}
